<!DOCTYPE html>
<html>
<head>
    <title><%= title %></title>
    <link rel='stylesheet' href='//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css'/>
</head>
<body style="width:70%;margin-left: 30px;">
<h3>We sent information about password reset to the email address of your recovery.</h3>
<hr/>
<% if(message.length > 0) { %>
<p><%= message %>
    <% if(requestBack){ %>
        <a href="/recovery">Try again</a>.
    <% } %>
</p>
<% } else { %>

<% if(messageForm.length > 0) { %>
<div class="alert alert-danger" id="error-box">
    <p><%= messageForm %></p>
</div>
<% } %>

<p>Enter your new password: </p>
<form name="login-form" action="/resetPassword" method="post">
    <input type="hidden" name="userId" value="<%= userId %>"/>
    <input type="hidden" name="tokenId" value="<%= tokenId %>"/>
    <div class="form-group">
        <label for="password">New password</label>
        <input type="password" name="password" id="password" placeholder="input password..." class="form-control" />
    </div>
    <div class="form-group">
        <label for="passwordConfirm">Password</label>
        <input type="password" name="passwordConfirm" id="passwordConfirm" placeholder="input password..." class="form-control" />
    </div>
    <button type="submit" class="btn btn-primary">Log In</button>
</form>
<% } %>

<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
</body>
</html>